﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/NoLeftMasterPage.master"
    AutoEventWireup="true" CodeFile="StageSplit.aspx.cs" Inherits="Pages_StageSplit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="Server">
    <div class='left_tree' id="left_container">
        <div class="left_tree_title">
            科目树</div>
        <asp:TreeView ID="tvAccountList" CssClass="left_tree_content" runat="server" OnSelectedNodeChanged="tvAccountList_SelectedNodeChanged">
            <SelectedNodeStyle CssClass="left_tree_selectNode" />
        </asp:TreeView>
    </div>
    <div class="right_container" id="right_container">
        <div class="right_title">
          <asp:Label ID="lbTitle" runat="server" Text="Label"></asp:Label> 实际已发生成本
            <asp:HyperLink ID="hl_url" runat="server" Target="_blank" >查看该科目各业态成本</asp:HyperLink>
        </div>
        <div class="right_contract">
            <asp:GridView ID="gvContractList" runat="server" AutoGenerateColumns="False" 
                CssClass="List" AllowPaging="True" 
                onpageindexchanging="gvContractList_PageIndexChanging" PageSize="4" 
                onrowdatabound="gvContractList_RowDataBound" >
                <Columns>
                    <asp:BoundField DataField="ContractNum" HeaderText="合同编号" 
                        ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:BoundField>
<%--                    <asp:BoundField DataField="ContractName" HeaderText="合同名称" 
                        ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:BoundField>--%>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="合同名称" >
                        <ItemTemplate>
                            <span title='<%#Eval("ContractName").ToString() %>'> <%#Eval("ContractName") != null && Eval("ContractName").ToString().Length > 20 ? Eval("ContractName").ToString().Substring(0, 19) + "..." : Eval("ContractName").ToString()%></span>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:BoundField DataField="ht_amount" HeaderText="合同金额（元）"  
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="sj_amount" HeaderText="设计变更（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="qs_amount" HeaderText="签证洽商（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="bc_amount" HeaderText="补充协议金额（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="other_amount" HeaderText="其他结算金额（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="js_amount" HeaderText="结算金额（元）" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>
<%--                    <asp:BoundField DataField="Scope" HeaderText="合同范围" 
                        ItemStyle-HorizontalAlign="Right" >
<ItemStyle HorizontalAlign="Right"></ItemStyle>
                    </asp:BoundField>--%>
                     <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="合同范围" >
                        <ItemTemplate>
                            <span title='<%#Eval("Scope").ToString() %>'> <%#Eval("Scope") != null && Eval("Scope").ToString().Length > 9 ? Eval("Scope").ToString().Substring(0,6)+"..." : Eval("Scope").ToString()%></span>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Left"></ItemStyle>
                    </asp:TemplateField>
                    <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <a target="_blank" href='AccountSplit.aspx?id=<%#Eval("Id").ToString() %>'>开始核算</a>
                        </ItemTemplate>

<ItemStyle HorizontalAlign="Center"></ItemStyle>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                <div style=" width:100%; text-align:left;">该科目上没有相关合同行！</div>
                    
                </EmptyDataTemplate>
            </asp:GridView>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="script" runat="Server">
    <link href="/Resource/css/cs_stage.css" rel="stylesheet" type="text/css" />
    <script src="../js/fix.js" type="text/javascript"></script>
    <script type="text/javascript">
        function load() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }

        function EndRequestHandler() {
            Fixed();
        }
        $(document).ready(function () {
            Fixed();
        });
    </script>
</asp:Content>
